import React from 'react';
import { PageContainer } from '@ant-design/pro-layout';
import { Card } from 'antd';
import Header from './components/DetailHeader';
import Statistics from './components/DetailStatistics';

class Detail extends React.Component {

  constructor(props) {
    super(props)
  }

  render() {
    const detail = this.props.location.state || {};
    console.log(detail)
    return (
      <PageContainer>
        <Card
          headStyle={{ borderBottom: "none" }}
          bodyStyle={{ paddingBottom: 10, marginBottom: 24 }}
          bordered={false}>
          <Header info={detail} />
        </Card>
        <Card
          headStyle={{ borderBottom: "none" }}
          bodyStyle={{ paddingBottom: 24, marginBottom: 24 }}
          bordered={false}>
          <Statistics info={detail} />
        </Card>
      </PageContainer>
    )
  }
}

export default Detail